﻿namespace Creek.UI.EFML.Base.EFML.Elements
{
    using System.Collections.Generic;
    using System.Linq;
    using System.Xml;

    public class MetaElement : ElementBase
    {
        #region Fields

        public string Content;

        public string Name;

        #endregion

        #region Public Methods and Operators

        public override void Process(List<ElementBase> Tree, EFMLDocument m)
        {
            Tree.AddRange(
                (from XmlNode mm in m.Meta
                 select
                     new MetaElement { Name = mm.GetAttributeByName("name"), Content = mm.GetAttributeByName("value") }));
        }

        #endregion
    }
}